package com.dz.dto;

import com.dz.entity.DishFlavor;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Data
public class DishDTO implements Serializable {

    @NotNull
    private Long id;

    //菜品名称
    @NotBlank(message = "菜品名称不能为空")
    private String name;

    //菜品分类id
    @NotNull(message = "菜品所属分类不能为空")
    private Long categoryId;

    //菜品价格
    @NotNull(message = "价格不合理")
    @DecimalMin(value = "0.00",message = "价格不合理")
    private BigDecimal price;

    //图片
    @NotBlank(message = "图片地址不能为空")
    private String image;

    //描述信息
    private String description;


    //0 停售 1 起售
    @NotNull(message = "菜品状态不能为空")
    private Integer status;
    //口味
    private List<DishFlavor> flavors = new ArrayList<>();

}
